﻿/*------------------------------------------------
// File Description: ReworkBom DataBase Entity
// Author:			 Crane
// Create Time:		 2020-06-25 00:57:53
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 返工BOM
    /// </summary>
    [Table(nameof(ReworkBom))]
    public class ReworkBom : BaseEntity
    {
        private string _reworkNo = string.Empty;
        private string _categoryCode = string.Empty;
        private string _categoryName = string.Empty;

        #region Public Property

        ///<Summary>
        /// 返工单号
        ///</Summary>
        public string ReworkNo
        {
            get { return string.IsNullOrWhiteSpace(_reworkNo) ? string.Empty : _reworkNo; }
            set { _reworkNo = value; }
        }

        ///<Summary>
        /// 物料分类代码
        ///</Summary>
        public string CategoryCode
        {
            get { return string.IsNullOrWhiteSpace(_categoryCode) ? string.Empty : _categoryCode; }
            set { _categoryCode = value; }
        }

        ///<Summary>
        /// 物料分类名称
        ///</Summary>
        public string CategoryName
        {
            get { return string.IsNullOrWhiteSpace(_categoryName) ? string.Empty : _categoryName; }
            set { _categoryName = value; }
        }

        /// <summary>
        /// 扣料数量
        /// </summary>
        public decimal Quality { get; set; }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 返工BOM
        /// </summary>
        public virtual DbSet<ReworkBom> ReworkBoms { get; set; }
    }
}